5 Maintenance > 5.12 Performance > 5.12.1 Java

5.12.1
This section gives information about the Java command execution throughput (“jPS”= Java statements per second). The scope of this measurement is only the statement execution time, not the execution delay (Java command on AT interface → Java instruction execution → reac­tion on GPIO).
Figure 13: Test case for measuring Java command execution throughput
The following Java instruction was used for calculation of the typical jPS:
value = ( 2 x number of calculation statements ) /
( (1 / frequencyB ) - ( 1 / frequencyA ) );
Measurement and calculation were done using:
•
•
number of calculation statements = 50 “result=(CONSTANT_VALUE/variable_value);”-Instructions (executed twice per pin cycle)
•
frequencyA as measured with a universal counter
•
frequencyB as measured with a universal counter
The reference loop has the same structure as the measurement loop except that the measure­ment sequence is moved.
Since only a small amount of Java code is executed in this test, it is easily optimized by the CLDC’s HI just-in-time compiler. More complex applications might not reach that execution speed.